package com.zhumo.sz.entity.bike;


import com.zhumo.sz.common.annotation.AlwaysAttribute;
import com.zhumo.sz.common.annotation.NestedEntity;
import com.zhumo.sz.common.annotation.TransientSink;
import com.zhumo.sz.gaode.FirstPoi;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.checkerframework.checker.units.qual.A;

import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 *
 * 共享单车订单明细重构
 * @author jiaqi.zhu
 * @time 2024-03-18
 * @log 2024-3-23 重构实体
 * id BIGINT 自增id PRIMARY KEY
 * order_id VARCHAR 订单id PRIMARY KEY
 * user_id VARCHAR  用户id FOREIGH KEY
 * bike_id VARCHAR 共享单车id  FOREIGH KEY
 * bike_com_id VARCHAR 共享单车企业id FOREIGH KEY
 * start_lat DOUBLE 起始纬度
 * start_lng DOUBLE 起始经度
 * start_city_code  VARCHAR 起始城市编码(ip网) FOREIGH KEY
 * start_city VARCHAR 起始城市
 * street_district_code VARCHAR 起始地区编码(ip网) FOREIGH KEY
 * start_district VARCHAR 起始地区
 * start_town_code VARCHAR 城镇编码
 * start_town  VARCHAR 起始城镇/街道名称
 * start_address_code VARCHAR 起始详细地址编码(高德)
 * start_business VARCHAR 起始所属商圈
 * start_roads TEXT 起始点附近主干道信息
 * start_famous_scenery TEXT 起始点风景名胜
 * start_service_apartment TEXT 起始点商务住宅
 * start_financial_insurance TEXT 起始点金融保险服务
 * start_science_education  TEXT 起始点科教文化服务
 * start_health_care TEXT 起始点医疗保健服务
 * start_shop TEXT 起始点购物服务
 * start_goveronment TEXT 起始点政府机构及团体
 * start_transportation TEXT 起始点交通设施服务
 * end_lat DOUBLE 结束纬度
 * end_lng DOUBLE 结束经度
 * end_city_code  VARCHAR 结束城市编码(ip网) FOREIGH KEY
 * end_city VARCHAR 结束城市
 * street_district_code VARCHAR 结束地区编码(ip网) FOREIGH KEY
 * end_district VARCHAR 结束地区
 * end_town_code VARCHAR 城镇编码
 * end_town  VARCHAR 结束城镇/街道名称
 * end_address_code VARCHAR 结束详细地址编码(高德)
 * end_business VARCHAR 结束所属商圈
 * end_roads TEXT 结束点附近主干道信息
 * end_famous_scenery TEXT 结束点风景名胜
 * end_service_apartment TEXT 结束点商务住宅
 * end_financial_insurance TEXT 结束点金融保险服务
 * end_science_education  TEXT 结束点科教文化服务
 * end_health_care TEXT 结束点医疗保健服务
 * end_shop TEXT 结束点购物服务
 * end_goveronment TEXT 结束点政府机构及团体
 * end_transportation TEXT 结束点交通设施服务
 * scan_code_app VARCHAR 扫码App名称
 * order_amount DECIMAL 订单金额
 * payment_amount DECIMAL 实际应付金额
 * is_package TINYINT 是否套餐
 * package_code VARCHAR 套餐编码
 * is_activity TINYINT 是否优惠活动
 * activity_code BIGINT 活动编码
 * activity_reduction_amount DECIMAL 活动减免金额
 * create_time TIMESTAMP 创建时间
 * update_time TIMESTAMP 更新时间
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "共享单车订单",description = "共享单车每日订单表")
public class SharedBikeOrderDetail {

    @TransientSink
    @ApiModelProperty("自增id")
    private Integer id;

    @ApiModelProperty("订单号")
    private String orderId;

    @ApiModelProperty("用户id")
    private String userId;

    @ApiModelProperty("自行车id")
    private Long bikeId;

    @ApiModelProperty("共享单车企业id")
    private Integer bikeComId;

    @ApiModelProperty("起始纬度")
    private Double startLat;

    @ApiModelProperty("起始经度")
    private Double startLng;

    @ApiModelProperty("起始城市编码")
    private String startCityCode;

    @ApiModelProperty("起始城市")
    private String startCity;

    @ApiModelProperty("起始地区编码")
    private String startDistrictCode;

    @ApiModelProperty("起始地区")
    private String startDistrict;

    @ApiModelProperty("起始城镇编码")
    private String startTownCode;

    @ApiModelProperty("起始城镇")
    private String startTown;

    @ApiModelProperty("起始点周边主干道")
    private String startRoads;

    @NestedEntity
    @AlwaysAttribute(value = "start")
    @ApiModelProperty("开锁点附近poi")
    private FirstPoi<String> startPoi;

    @ApiModelProperty("结束纬度")
    private Double endLat;

    @ApiModelProperty("结束经度")
    private Double endLng;

    @ApiModelProperty("结束城市编码")
    private String endCityCode;

    @ApiModelProperty("结束城市")
    private String endCity;

    @ApiModelProperty("结束地区编码")
    private String endDistrictCode;

    @ApiModelProperty("结束地区")
    private String endDistrict;

    @ApiModelProperty("结束城镇编码")
    private String endTownCode;

    @ApiModelProperty("结束城镇")
    private String endTown;

    @ApiModelProperty("锁车点附近主干道")
    private String endRoads;

    @NestedEntity
    @AlwaysAttribute(value = "end")
    @ApiModelProperty("锁车点poi")
    private FirstPoi<String> endPoi;

    @ApiModelProperty("开锁APP")
    private String scanCodeApp;

    @ApiModelProperty("订单金额")
    private BigDecimal orderAmount;

    @ApiModelProperty("应付金额")
    private BigDecimal paymentAmount;

    @ApiModelProperty("开锁时间")
    private Timestamp openTime;

    @ApiModelProperty("锁车时间")
    private Timestamp lockTime;

    @ApiModelProperty("支付时间")
    private Timestamp paymentTime;

    @ApiModelProperty("支付方式")
    private String paymentType;  //支付宝 微信

    @ApiModelProperty("支付流水号")
    private String serialNumber;

//    @TransientSink
//    @ApiModelProperty("是否参加套餐")
//    private Boolean isPackage;

    @ApiModelProperty("套餐编码")
    private String packageCode;

    @ApiModelProperty("活动编码")
    private Integer activityCode;

    @ApiModelProperty("套餐或活动减免金额")
    private BigDecimal activityReductionAmount;

    @ApiModelProperty("创建时间")
    private Timestamp createTime;

    @ApiModelProperty("状态更新时间")
    private Timestamp updateTime;
}
